from rest_framework import serializers

from utils.decorators.swagger import data_response_decorator
from utils.handlers.swagger import NotHandledSerializer

NotHandledResponseDataSerializer = data_response_decorator(NotHandledSerializer)


class CharFieldSerializer(serializers.CharField):
    class Meta:
        ref_name = 'TextResponse'


CharFieldResponseDataSerializer = data_response_decorator()(CharFieldSerializer)
CharFieldManyResponseDataSerializer = data_response_decorator(many=True, ref_name='TextResponses')(CharFieldSerializer)
